home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 16 / CU Amiga Magazine's Super CD-ROM 16 (1997-10-16)(EMAP Images)(GB)[!][issue 1997-11].iso / CUCD / Graphics / Ghostscript / source / amiga / unixtail.mak.in < prev    next >
Text File  |  1997-08-10  |  6KB  |  153 lines

  1. #    Copyright (C) 1990, 1995, 1996, 1997 Aladdin Enterprises.  All rights reserved.
  2. # This file is part of Aladdin Ghostscript.
  3. # Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author
  4. # or distributor accepts any responsibility for the consequences of using it,
  5. # or for whether it serves any particular purpose or works at all, unless he
  6. # or she says so in writing.  Refer to the Aladdin Ghostscript Free Public
  7. # License (the "License") for full details.
  8. # Every copy of Aladdin Ghostscript must include a copy of the License,
  9. # normally in a plain ASCII text file named PUBLIC.  The License grants you
  10. # the right to copy, modify and redistribute Aladdin Ghostscript, but only
  11. # under certain conditions described in the License.  Among other things, the
  12. # License requires that the copyright notice and this notice be preserved on
  13. # all copies.
  14.  
  15. # Partial makefile common to all Unix configurations.
  16.  
  17. # This is the last part of the makefile for Unix configurations.
  18. # Since Unix make doesn't have an 'include' facility, we concatenate
  19. # the various parts of the makefile together by brute force (in tar_cat).
  20.  
  21. # Define the name of this makefile.
  22. UNIXTAIL_MAK=unixtail.mak
  23.  
  24. # The following prevents GNU make from constructing argument lists that
  25. # include all environment variables, which can easily be longer than
  26. # brain-damaged system V allows.
  27.  
  28. .NOEXPORT:
  29.  
  30. # -------------------------------- Library -------------------------------- #
  31.  
  32. amiga__=gp_nofb.$(OBJ) gp_amiga.$(OBJ) gdevpipe.$(OBJ) #ldexp.$(OBJ) frexp.$(OBJ) modf.$(OBJ)
  33. amiga_.dev: $(amiga__)
  34.     $(SETMOD) amiga_ $(amiga__)
  35.     $(ADDMOD) amiga_ -iodev pipe
  36.  
  37. gp_amiga.$(OBJ): gp_amiga.c $(AK) $(string__h) $(gx_h) $(gsexit_h) $(gp_h) \
  38.   $(time__h)
  39.  
  40. ## The Unix platforms
  41.  
  42. # We have to include a test for the existence of sys/time.h,
  43. # because some System V platforms don't have it.
  44.  
  45. # Define pipes as a separable feature.
  46.  
  47. pipe_=gdevpipe.$(OBJ)
  48. pipe.dev: $(UNIXTAIL_MAK) $(ECHOGS_XE) $(pipe_)
  49.     $(SETMOD) pipe $(pipe_)
  50.     $(ADDMOD) pipe -iodev pipe
  51.  
  52. gdevpipe.$(OBJ): gdevpipe.c $(AK) $(errno__h) $(stdio__h) $(string__h) \
  53.   $(gserror_h) $(gsmemory_h) $(gstypes_h) $(gxiodev_h) $(stream_h)
  54.  
  55. # Unix platforms other than System V, and also System V Release 4
  56. # (SVR4) platforms.
  57. unix__=gp_nofb.$(OBJ) gp_unix.$(OBJ) gp_unifs.$(OBJ) gp_unifn.$(OBJ)
  58. unix_.dev: $(unix__)
  59.     $(SETMOD) unix_ $(unix__)
  60.  
  61. gp_unix.$(OBJ): gp_unix.c $(AK) $(string__h) $(gx_h) $(gsexit_h) $(gp_h) \
  62.   $(time__h)
  63.  
  64. # System V platforms other than SVR4, which lack some system calls,
  65. # but have pipes.
  66. sysv__=gp_nofb.$(OBJ) gp_unix.$(OBJ) gp_unifs.$(OBJ) gp_unifn.$(OBJ) gp_sysv.$(OBJ)
  67. sysv_.dev: $(sysv__)
  68.     $(SETMOD) sysv_ $(sysv__)
  69.  
  70. gp_sysv.$(OBJ): gp_sysv.c $(stdio__h) $(time__h) $(AK)
  71.  
  72. # -------------------------- Auxiliary programs --------------------------- #
  73.  
  74. $(ANSI2KNR_XE): ansi2knr.c
  75.     $(CCA2K) $(O)$(ANSI2KNR_XE) $(srcdir)/ansi2knr.c
  76.  
  77. $(ECHOGS_XE): echogs.c $(AK)
  78.     $(CCAUX) $(O)$(ECHOGS_XE) $(srcdir)/echogs.c
  79.  
  80. # On the RS/6000 (at least), compiling genarch.c with gcc with -O
  81. # produces a buggy executable.
  82. $(GENARCH_XE): genarch.c $(AK) $(stdpre_h)
  83.     $(CCAUX) $(O)$(GENARCH_XE) $(srcdir)/genarch.c
  84.  
  85. $(GENCONF_XE): genconf.c $(AK) $(stdpre_h)
  86.     $(CCAUX) $(O)$(GENCONF_XE) $(srcdir)/genconf.c
  87.  
  88. $(GENINIT_XE): geninit.c $(AK) $(stdio__h) $(string__h)
  89.     $(CCAUX) $(O)$(GENINIT_XE) $(srcdir)/geninit.c
  90.  
  91. # Query the environment to construct gconfig_.h.
  92. # The "else true; is required because Ultrix's implementation of sh -e
  93. # terminates execution of a command if any error occurs, even if the command
  94. # traps the error with ||.
  95. INCLUDE=/usr/include
  96. gconfig_.h: $(UNIXTAIL_MAK) $(ECHOGS_XE)
  97.     ./echogs -w gconfig_.h -x 2f2a -s This file was generated automatically. -s -x 2a2f
  98.     if ( test -f $(INCLUDE)/dirent.h ); then ./echogs -a gconfig_.h -x 23 define HAVE_DIRENT_H; else true; fi
  99.     if ( test -f $(INCLUDE)/ndir.h ); then ./echogs -a gconfig_.h -x 23 define HAVE_NDIR_H; else true; fi
  100.     if ( test -f $(INCLUDE)/sys/dir.h ); then ./echogs -a gconfig_.h -x 23 define HAVE_SYS_DIR_H; else true; fi
  101.     if ( test -f $(INCLUDE)/sys/ndir.h ); then ./echogs -a gconfig_.h -x 23 define HAVE_SYS_NDIR_H; else true; fi
  102.     if ( test -f $(INCLUDE)/sys/time.h ); then ./echogs -a gconfig_.h -x 23 define HAVE_SYS_TIME_H; else true; fi
  103.     if ( test -f $(INCLUDE)/sys/times.h ); then ./echogs -a gconfig_.h -x 23 define HAVE_SYS_TIMES_H; else true; fi
  104.  
  105. # ----------------------------- Main program ------------------------------ #
  106.  
  107. ### Library files and archive
  108.  
  109. LIB_ARCHIVE_ALL=$(LIB_ALL) $(DEVS_ALL)\
  110.  gsnogc.$(OBJ) gconfig.$(OBJ) gscdefs.$(OBJ)
  111.  
  112. # Build an archive for the library only.
  113. # This is not used in a standard build.
  114. GSLIB_A=$(GS)lib.a
  115. $(GSLIB_A): $(LIB_ARCHIVE_ALL)
  116.     rm -f $(GSLIB_A)
  117.     $(AR) $(ARFLAGS) $(GSLIB_A) $(LIB_ARCHIVE_ALL)
  118.     $(RANLIB) $(GSLIB_A)
  119.  
  120. ### Interpreter main program
  121.  
  122. INT_ARCHIVE_ALL=imainarg.$(OBJ) imain.$(OBJ) $(INT_ALL) $(DEVS_ALL)\
  123.  gconfig.$(OBJ) gscdefs.$(OBJ)
  124. XE_ALL=gs.$(OBJ) $(INT_ARCHIVE_ALL)
  125.  
  126. # Build a library archive for the entire interpreter.
  127. # This is not used in a standard build.
  128. GS_A=$(GS).a
  129. $(GS_A): $(INT_ARCHIVE_ALL)
  130.     rm -f $(GS_A)
  131.     $(AR) $(ARFLAGS) $(GS_A) $(INT_ARCHIVE_ALL)
  132.     $(RANLIB) $(GS_A)
  133.  
  134. # Here is the final link step.  The stuff with LD_RUN_PATH is for SVR4
  135. # systems with dynamic library loading; I believe it's harmless elsewhere.
  136. # The resetting of the environment variables to empty strings is for SCO Unix,
  137. # which has limited environment space.
  138. $(GS_XE): ld.tr echogs $(XE_ALL)
  139.     ./echogs -w ldt.tr -n - $(CCLD) $(LDFLAGS) $(XLIBDIRS) -o $(GS_XE)
  140.     ./echogs -a ldt.tr -n -s gs.$(OBJ) -s
  141.     cat ld.tr >>ldt.tr
  142.     ./echogs -a ldt.tr -s - $(EXTRALIBS) -lm
  143.     LD_RUN_PATH=$(XLIBDIR); export LD_RUN_PATH; \
  144.     XCFLAGS= XINCLUDE= XLDFLAGS= XLIBDIRS= XLIBS= \
  145.     FEATURE_DEVS= DEVICE_DEVS= DEVICE_DEVS1= DEVICE_DEVS2= DEVICE_DEVS3= \
  146.     DEVICE_DEVS4= DEVICE_DEVS5= DEVICE_DEVS6= DEVICE_DEVS7= DEVICE_DEVS8= \
  147.     DEVICE_DEVS9= DEVICE_DEVS10= DEVICE_DEVS11= DEVICE_DEVS12= \
  148.     DEVICE_DEVS13= DEVICE_DEVS14= DEVICE_DEVS15= \
  149.     $(SH) <ldt.tr
  150.